home *** CD-ROM | disk | FTP | other *** search
/ Gigarom 1 / Gigarom Macintosh Archives (Quantum Leap)(CDRM1080320)(1993).iso / FILES / HYP / J-M / Kids El Verbo Simple.cpt / El Verbo Simple 1.1 / background_72461.txt < prev    next >
Text File  |  1990-11-11  |  5KB  |  155 lines

  1. -- background: 72461 from stack: in.1
  2. -- bmap block id: 74486
  3. -- flags: 4000
  4. -- background id: 0
  5. -- name: 
  6. ----- HyperTalk script -----
  7. On PutSubject SubName, SubRef
  8.   Global Subject, PrevSubject
  9.   if the hilite of card button SubName is true then
  10.     put true into item SubRef of Subject
  11.     if PrevSubject>SubRef then
  12.       put SubRef into PrevSubject
  13.     end if
  14.   else
  15.     put false into item SubRef of Subject
  16.   end if
  17. end PutSubject
  18.  
  19. On PutTense TenseName, TenseRef
  20.   Global Tense, FmrTense
  21.   if the hilite of card button TenseName is true then
  22.     put true into item TenseRef of Tense
  23.     if FmrTense>TenseRef then
  24.       put TenseRef into PrevTense
  25.     end if
  26.   else
  27.     put false into item TenseRef of Tense
  28.   end if
  29. end PutTense
  30.  
  31. Function GetSubject
  32. Global Subject, PrevSubject
  33. put 0 into SubRef
  34. repeat with count=1 to 6
  35.   if item count of Subject is true then
  36.     if count>PrevSubject then
  37.       put count into SubRef
  38.       exit repeat
  39.     end if
  40.   end if
  41. end repeat
  42. return SubRef
  43. end GetSubject
  44.  
  45. Function GetTense
  46. Global Tense,FmrTense
  47. put 0 into TenseRef
  48. repeat with count=1 to 8
  49.   if item count of Tense is true then
  50.     if count>FmrTense then
  51.       put count into TenseRef
  52.       exit repeat
  53.     end if
  54.   end if
  55. end repeat
  56. return TenseRef
  57. end GetTense
  58.  
  59. on DoQuestion
  60.   Global PrevSubject, FmrTense, Answer, CurrentConj
  61.   if the hilite of card button "Some Subjects" is true then
  62.     put GetSubject() into QuizSub
  63.     if QuizSub is 0 then
  64.       put 0 into PrevSubject
  65.       put GetSubject() into QuizSub
  66.       if QuizSub is 0 then
  67.         put 1 into QuizSub
  68.         click at the loc of card button "All Subjects"
  69.       end if
  70.     end if
  71.     put QuizSub into PrevSubject
  72.   else
  73.     put Random(6) into QuizSub
  74.   end if
  75.   if the hilite of card button "Some Tenses" is true then
  76.     put GetTense() into QuizTense
  77.     if QuizTense is 0 then
  78.       put 0 into FmrTense
  79.       put GetTense() into QuizTense
  80.       if QuizTense is 0 then
  81.         put 1 into QuizTense
  82.         click at the loc of card button "All Tenses"
  83.       end if
  84.     end if
  85.     put QuizTense into FmrTense
  86.     if QuizTense is 6 then
  87.       put 5+Random(4) into QuizTense
  88.     else
  89.       if QuizTense is 7 then
  90.         put 9+Random(4) into QuizTense
  91.       else
  92.         if QuizTense is 8 then
  93.           put 13+Random(4) into QuizTense
  94.         end if
  95.       end if
  96.     end if
  97.   else
  98.     put Random(17) into QuizTense
  99.   end if
  100.   push card
  101.   lock screen
  102.   go to any card of background id 2629
  103.   put bg field "Verb" into QuizVerb
  104.   get Offset("(",QuizVerb)
  105.   if it>0 then put first word of bg field "Verb" into QuizVerb
  106.   if (the hilite of cd btn "Irregular 1" is true) and (QuizTense is 1) then
  107.     get "Present"&QuizSub
  108.     put background field it into Answer
  109.   else
  110.     if (the hilite of cd btn "Irregular 2" is true) and (QuizTense is 2) then
  111.       get "Preterite"&QuizSub
  112.       put background field it into Answer
  113.     else
  114.       Conjugate background field "Verb",QuizTense,Normal
  115.       get "Normal"&QuizSub
  116.       put background field it into Answer
  117.       get background field "SubjectRef"
  118.       if QuizSub is not it then FormVerb It
  119.     end if
  120.   end if
  121.   pop card
  122.   SetQuizCard QuizVerb,QuizSub,QuizTense
  123.   put empty into card field "Response"
  124.   unlock screen
  125.   click at the loc of card field "Response"
  126. end DoQuestion
  127.  
  128. on SetQuizCard Verb,Person,Tense
  129.   put Verb into card field "QVerb"
  130.   if Person is 1 then put "Yo" into card field "QPerson"
  131.   if Person is 2 then put "T√∫" into card field "QPerson"
  132.   if Person is 3 then put "√©l,ella,Ud." into card field "QPerson"
  133.   if Person is 4 then put "Nosotros" into card field "QPerson"
  134.   if Person is 5 then put "Vosotros" into card field "QPerson"
  135.   if Person is 6 then put "ellos,ellas,Uds." into card field "QPerson"
  136.   if Tense is 1 then put "Present" into card field "QTense"
  137.   if Tense is 2 then put "Preterite" into card field "QTense"
  138.   if Tense is 3 then put "Imperfect" into card field "QTense"
  139.   if Tense is 4 then put "Future" into card field "QTense"
  140.   if Tense is 5 then put "Conditional" into card field "QTense"
  141.   if Tense is 6 then put "Present Progressive" into card field "QTense"
  142.   if Tense is 7 then put "Past Progressive" into card field "QTense"
  143.   if Tense is 8 then put "Conditional Progressive" into cd fld "QTense"
  144.   if Tense is 9 then put "Future Progressive" into card field "QTense"
  145.   if Tense is 10 then put "Present Perfect" into card field "QTense"
  146.   if Tense is 11 then put "Pluperfect" into card field "QTense"
  147.   if Tense is 12 then put "Future Perfect" into card field "QTense"
  148.   if Tense is 13 then put "Conditional Perfect" into cd fld "QTense"
  149.   if Tense is 14 then put "Present Subjunctive" into cd fld "QTense"
  150.   if Tense is 15 then put "Imperfect Subjunctive" into cd fld "QTense"
  151.   if Tense is 16 then put "Present Perfect Subjunctive" into cd fld "QTense"
  152.   if Tense is 17 then put "Pluperfect Subjunctive" into cd fld "QTense"
  153. end SetQuizCard
  154.  
  155.